<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  name: 'app',
  components: {},
  methods: {},
  created() {
    // 获取当前屏幕宽度
    const htmlWidth = document.documentElement.clientWidth || document.body.clientWidth;
    this.$store.commit('setScreenWidth', htmlWidth);
    console.log('htmlWidth', htmlWidth);
  },
  mounted() {},
};
</script>
<style lang="less">
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
}

#app,
html,
body {
  width: 100%;
  height: 100%;
}
div {
  box-sizing: border-box;
}
a {
  text-decoration: none;
}
</style>
